package com.example.rcmanager.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class RCDBHelper extends SQLiteOpenHelper {

	private static final String TAG = "TestSQLite";
	public static final int VERSION = 1;

	public RCDBHelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, name, factory, version);
	}

	public void onCreate(SQLiteDatabase db) {
		String usersql = "create table userinfo(name varchar(100) primary key , psw varchar(100), job varchar(100), gole varchar(100))";
		String tasksql = "create table taskinfo(title varchar(100) primary key, deadline varchar(100),kind varchar(100),gole varchar(100),target varchar(100),strate varchar(100),remark varchar(100),status varchar(100),tag varchar(100))";

		Log.i(TAG, "create Database------------->");

		db.execSQL(usersql);
		db.execSQL(tasksql);
	}

	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		Log.i(TAG, "update Database------------->");
	}
}